import 'package:azlistview/azlistview.dart';
import 'package:library_base/entities/generated/json/base/json_field.dart';
import 'package:library_base/entities/generated/json/suppliers_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class SuppliersEntity extends ISuspensionBean {

  late String id;
  late String name;
  String? tagIndex;
  String? namePinyin;
  bool isSelect = false;

  SuppliersEntity();

  factory SuppliersEntity.fromJson(Map<String, dynamic> json) => $SuppliersEntityFromJson(json);

  Map<String, dynamic> toJson() => $SuppliersEntityToJson(this);

  @override
  String getSuspensionTag() => tagIndex!;

  @override
  String toString() => json.encode(this);

  @override
  bool operator ==(Object other) => identical(this, other) || other is SuppliersEntity && runtimeType == other.runtimeType && id == other.id;

  @override
  int get hashCode => id.hashCode;
}